package cn.edu.zjicm.wordsnet_d.db;

import java.util.List;
import java.util.Locale;
import java.util.Vector;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.os.Environment;

public class DatabaseHelperLocationAndSchool extends SQLiteOpenHelper{
	public static final String PACKAGE_NAME = "cn.edu.zjicm.wordsnet_d";//包名
    public static final String DB_PATH = "/data" + Environment.getDataDirectory().getAbsolutePath() + "/" + PACKAGE_NAME + "/databases/";
	public static final String DATABASE_NAME = "locationschool.s3db";
	static final int DATABASE_VERSION = 1;
	static List<SQLiteDatabase> dbpool = new Vector<SQLiteDatabase>();
	public static boolean dbinited=true;
	private Context context;

	public DatabaseHelperLocationAndSchool(Context context) {
		super(context, DATABASE_NAME, null, DATABASE_VERSION);
		Locale.setDefault(Locale.CHINA);		
		this.context = context;
	}

	@Override
	// 创建数据库后，对数据库的操作
	public void onCreate(SQLiteDatabase db) {

	}

	@Override
	// 更改数据库版本的操作
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

	}
	
	@Override
	// 每次成功打开数据库后首先被执行
	public void onOpen(SQLiteDatabase db) {
		super.onOpen(db);
		
		dbpool.add(db);
	}

}
